


public class GreaterThanEqualsFunction extends Function{

	{
		order = 2;
	}

	public double evaluate(double[] vars){
		//TODO What is the return type? If double, then 0 for false and 1 for true? 
		
		boolean result = children.get(0).evaluate(vars) >= children.get(1).evaluate(vars);
		
		return result==false ? 0.0 : 1.0;
	}

	public GreaterThanEqualsFunction deepCopy(){
		GreaterThanEqualsFunction returner = new GreaterThanEqualsFunction();
		for(Node myChild:this.children){
			returner.children.add(myChild.deepCopy());
		}
		for(Node otherChild:returner.children){
			otherChild.parent = returner;
		}
		returner.size = this.size;
		return returner;
	}
	
	public String toString() {
		return "("+this.children.get(0)+" >= "+this.children.get(1)+" )";
	}
}